gint for_size, full_size;
gboolean rtl;
- group_allocs = gtk_cell_area_box_context_get_orientation_allocs (context, &n_allocs);
+ group_allocs = _gtk_cell_area_box_context_get_orientation_allocs (context, &n_allocs);
if (!group_allocs)
return allocate_cells_manually (box, widget, width, height);
GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area);
GtkCellAreaBoxPrivate *priv = box->priv;
GtkCellAreaContext *copy =
- (GtkCellAreaContext *)gtk_cell_area_box_context_copy (GTK_CELL_AREA_BOX (area),
+ (GtkCellAreaContext *)_gtk_cell_area_box_context_copy (GTK_CELL_AREA_BOX (area),
GTK_CELL_AREA_BOX_CONTEXT (context));
priv->contexts = g_slist_prepend (priv->contexts, copy);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (for_size < 0)
- gtk_cell_area_box_context_push_group_width (context, group->id, group_min_size, group_nat_size);
+ _gtk_cell_area_box_context_push_group_width (context, group->id, group_min_size, group_nat_size);
else
- gtk_cell_area_box_context_push_group_width_for_height (context, group->id, for_size,
+ _gtk_cell_area_box_context_push_group_width_for_height (context, group->id, for_size,
group_min_size, group_nat_size);
}
else
{
if (for_size < 0)
- gtk_cell_area_box_context_push_group_height (context, group->id, group_min_size, group_nat_size);
+ _gtk_cell_area_box_context_push_group_height (context, group->id, group_min_size, group_nat_size);
else
- gtk_cell_area_box_context_push_group_height_for_width (context, group->id, for_size,
+ _gtk_cell_area_box_context_push_group_height_for_width (context, group->id, for_size,
group_min_size, group_nat_size);
}
}
n_expand_groups = count_expand_groups (box);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
- orientation_sizes = gtk_cell_area_box_context_get_widths (context, &n_groups);
+ orientation_sizes = _gtk_cell_area_box_context_get_widths (context, &n_groups);
else
- orientation_sizes = gtk_cell_area_box_context_get_heights (context, &n_groups);
+ orientation_sizes = _gtk_cell_area_box_context_get_heights (context, &n_groups);
/* First start by naturally allocating space among groups of cells */
avail_size -= (n_groups - 1) * priv->spacing;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
- gtk_cell_area_box_context_push_group_height_for_width (context, group_idx, for_size,
+ _gtk_cell_area_box_context_push_group_height_for_width (context, group_idx, for_size,
group_min, group_nat);
}
else
{
- gtk_cell_area_box_context_push_group_width_for_height (context, group_idx, for_size,
+ _gtk_cell_area_box_context_push_group_width_for_height (context, group_idx, for_size,
group_min, group_nat);
}
}
#include "gtkorientable.h"
/* GObjectClass */
-static void gtk_cell_area_box_context_finalize (GObject *object);
+static void _gtk_cell_area_box_context_finalize (GObject *object);
/* GtkCellAreaContextClass */
-static void gtk_cell_area_box_context_reset (GtkCellAreaContext *context);
-static void gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context,
+static void _gtk_cell_area_box_context_reset (GtkCellAreaContext *context);
+static void _gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context,
gint width,
gint *minimum_height,
gint *natural_height);
-static void gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context,
+static void _gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context,
gint height,
gint *minimum_width,
gint *natural_width);
/* Internal functions */
-static void gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context,
+static void _gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context,
GtkOrientation orientation,
gint for_size,
gint *minimum_size,
gboolean *align;
};
-G_DEFINE_TYPE (GtkCellAreaBoxContext, gtk_cell_area_box_context, GTK_TYPE_CELL_AREA_CONTEXT);
+G_DEFINE_TYPE (GtkCellAreaBoxContext, _gtk_cell_area_box_context, GTK_TYPE_CELL_AREA_CONTEXT);
static void
free_cache_array (GArray *array)
}
static void
-gtk_cell_area_box_context_init (GtkCellAreaBoxContext *box_context)
+_gtk_cell_area_box_context_init (GtkCellAreaBoxContext *box_context)
{
GtkCellAreaBoxContextPrivate *priv;
}
static void
-gtk_cell_area_box_context_class_init (GtkCellAreaBoxContextClass *class)
+_gtk_cell_area_box_context_class_init (GtkCellAreaBoxContextClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkCellAreaContextClass *context_class = GTK_CELL_AREA_CONTEXT_CLASS (class);
/* GObjectClass */
- object_class->finalize = gtk_cell_area_box_context_finalize;
+ object_class->finalize = _gtk_cell_area_box_context_finalize;
- context_class->reset = gtk_cell_area_box_context_reset;
- context_class->get_preferred_height_for_width = gtk_cell_area_box_context_get_preferred_height_for_width;
- context_class->get_preferred_width_for_height = gtk_cell_area_box_context_get_preferred_width_for_height;
+ context_class->reset = _gtk_cell_area_box_context_reset;
+ context_class->get_preferred_height_for_width = _gtk_cell_area_box_context_get_preferred_height_for_width;
+ context_class->get_preferred_width_for_height = _gtk_cell_area_box_context_get_preferred_width_for_height;
g_type_class_add_private (object_class, sizeof (GtkCellAreaBoxContextPrivate));
}
* GObjectClass *
*************************************************************/
static void
-gtk_cell_area_box_context_finalize (GObject *object)
+_gtk_cell_area_box_context_finalize (GObject *object)
{
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (object);
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
g_free (priv->expand);
g_free (priv->align);
- G_OBJECT_CLASS (gtk_cell_area_box_context_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_gtk_cell_area_box_context_parent_class)->finalize (object);
}
/*************************************************************
* GtkCellAreaContextClass *
*************************************************************/
static void
-gtk_cell_area_box_context_reset (GtkCellAreaContext *context)
+_gtk_cell_area_box_context_reset (GtkCellAreaContext *context)
{
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context);
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
g_hash_table_remove_all (priv->heights);
GTK_CELL_AREA_CONTEXT_CLASS
- (gtk_cell_area_box_context_parent_class)->reset (context);
+ (_gtk_cell_area_box_context_parent_class)->reset (context);
}
static void
-gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context,
+_gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context,
GtkOrientation orientation,
gint for_size,
gint *minimum_size,
}
static void
-gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context,
+_gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context,
gint width,
gint *minimum_height,
gint *natural_height)
{
- gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_VERTICAL,
+ _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_VERTICAL,
width, minimum_height, natural_height);
}
static void
-gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context,
+_gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context,
gint height,
gint *minimum_width,
gint *natural_width)
{
- gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_HORIZONTAL,
+ _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_HORIZONTAL,
height, minimum_width, natural_width);
}
}
GtkCellAreaBoxContext *
-gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
+_gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
GtkCellAreaBoxContext *context)
{
GtkCellAreaBoxContext *copy;
}
void
-gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_width,
gint natural_width)
}
if (grew)
- gtk_cell_area_box_context_sum (box_context, GTK_ORIENTATION_HORIZONTAL, -1, NULL, NULL);
+ _gtk_cell_area_box_context_sum (box_context, GTK_ORIENTATION_HORIZONTAL, -1, NULL, NULL);
}
void
-gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint minimum_height,
}
void
-gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_height,
gint natural_height)
}
if (grew)
- gtk_cell_area_box_context_sum (box_context, GTK_ORIENTATION_VERTICAL, -1, NULL, NULL);
+ _gtk_cell_area_box_context_sum (box_context, GTK_ORIENTATION_VERTICAL, -1, NULL, NULL);
}
void
-gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint minimum_width,
}
void
-gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_width,
gint *natural_width)
}
void
-gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint *minimum_height,
}
void
-gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_height,
gint *natural_height)
}
void
-gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint *minimum_width,
}
static GtkRequestedSize *
-gtk_cell_area_box_context_get_requests (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_requests (GtkCellAreaBoxContext *box_context,
GtkCellAreaBox *area,
GtkOrientation orientation,
gint for_size,
gint extra_size, extra_extra;
gint avail_size = size;
- sizes = gtk_cell_area_box_context_get_requests (context, area, orientation, for_size, &n_groups);
+ sizes = _gtk_cell_area_box_context_get_requests (context, area, orientation, for_size, &n_groups);
array = get_array (context, orientation, for_size);
n_expand_groups = count_expand_groups (context);
}
GtkRequestedSize *
-gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context,
gint *n_widths)
{
GtkCellAreaBox *area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (GTK_CELL_AREA_CONTEXT (box_context));
- return gtk_cell_area_box_context_get_requests (box_context, area, GTK_ORIENTATION_HORIZONTAL, -1, n_widths);
+ return _gtk_cell_area_box_context_get_requests (box_context, area, GTK_ORIENTATION_HORIZONTAL, -1, n_widths);
}
GtkRequestedSize *
-gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context,
+_gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context,
gint *n_heights)
{
GtkCellAreaBox *area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (GTK_CELL_AREA_CONTEXT (box_context));
- return gtk_cell_area_box_context_get_requests (box_context, area, GTK_ORIENTATION_VERTICAL, -1, n_heights);
+ return _gtk_cell_area_box_context_get_requests (box_context, area, GTK_ORIENTATION_VERTICAL, -1, n_heights);
}
GtkCellAreaBoxAllocation *
-gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context,
+_gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context,
gint *n_allocs)
{
GtkCellAreaContext *ctx = GTK_CELL_AREA_CONTEXT (context);
G_BEGIN_DECLS
-#define GTK_TYPE_CELL_AREA_BOX_CONTEXT (gtk_cell_area_box_context_get_type ())
+#define GTK_TYPE_CELL_AREA_BOX_CONTEXT (_gtk_cell_area_box_context_get_type ())
#define GTK_CELL_AREA_BOX_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_AREA_BOX_CONTEXT, GtkCellAreaBoxContext))
#define GTK_CELL_AREA_BOX_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_AREA_BOX_CONTEXT, GtkCellAreaBoxContextClass))
#define GTK_IS_CELL_AREA_BOX_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_AREA_BOX_CONTEXT))
};
-GType gtk_cell_area_box_context_get_type (void) G_GNUC_CONST;
+GType _gtk_cell_area_box_context_get_type (void) G_GNUC_CONST;
/* Create a duplicate of the context */
-GtkCellAreaBoxContext *gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
+GtkCellAreaBoxContext *_gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
GtkCellAreaBoxContext *box_context);
/* Initialize group array dimensions */
gboolean *align_groups);
/* Update cell-group sizes */
-void gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_width,
gint natural_width);
-void gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint minimum_height,
gint natural_height);
-void gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint minimum_height,
gint natural_height);
-void gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint minimum_width,
gint natural_width);
/* Fetch cell-group sizes */
-void gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_width,
gint *natural_width);
-void gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_width,
gint *minimum_height,
gint *natural_height);
-void gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint *minimum_height,
gint *natural_height);
-void gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context,
+void _gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context,
gint group_idx,
gint for_height,
gint *minimum_width,
gint *natural_width);
-GtkRequestedSize *gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context,
+GtkRequestedSize *_gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context,
gint *n_widths);
-GtkRequestedSize *gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context,
+GtkRequestedSize *_gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context,
gint *n_heights);
/* Private context/area interaction */
} GtkCellAreaBoxAllocation;
GtkCellAreaBoxAllocation *
-gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context,
+_gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context,
gint *n_allocs);
G_END_DECLS